package sk.fhi.client.gin;

import net.customware.gwt.presenter.client.DefaultEventBus;
import net.customware.gwt.presenter.client.EventBus;
import net.customware.gwt.presenter.client.place.PlaceManager;
import sk.fhi.client.AppController;
import sk.fhi.client.presenter.EditContactPresenter;
import sk.fhi.client.presenter.ListContactPresenter;
import sk.fhi.client.view.EditContactView;
import sk.fhi.client.view.ListContactView;

import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.Singleton;

public class CRUDClientModule extends  AbstractGinModule{

	@Override
	protected void configure() {
		
		bind(EventBus.class).to(DefaultEventBus.class).in(Singleton.class);
		
		bind(PlaceManager.class).in(Singleton.class);
		
		bind(ListContactPresenter.class).in(Singleton.class);
		
		bind(ListContactPresenter.Display.class).to(ListContactView.class).in(Singleton.class);

		bind(EditContactPresenter.class).in(Singleton.class);
		
		bind(EditContactPresenter.Display.class).to(EditContactView.class).in(Singleton.class);
		
		bind(AppController.class).in(Singleton.class);

	}

}
